home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / perl / mac-perl / gs_102st.bin / GUSI / GUSI_P.h < prev    next >
MacBinary  |  1993-01-17  |  9.9 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Jan 17 13:08:45 1993, modified Sun Jan 17 13:08:45 1993, creator 'MPS ', type ASCII, 9275 bytes "GUSI_P.h" , at 0x24bb 580 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 47 55 53 49 5f 50 | 2e 68 00 00 00 00 00 00 |..GUSI_P|.h......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 24 3b 00 | 00 02 44 a7 7f 51 2d a7 |.....$;.|..D..Q-.|
|00000060| 7f 51 2d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.Q-.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 24 0f 00 00 |........|....$...|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 0d 50 | 72 6f 6a 65 63 74 09 3a |******.P|roject.:|
|000000d0| 09 47 55 53 49 09 09 09 | 09 2d 09 47 72 61 6e 64 |.GUSI...|.-.Grand|
|000000e0| 20 55 6e 69 66 69 65 64 | 20 53 6f 63 6b 65 74 20 | Unified| Socket |
|000000f0| 49 6e 74 65 72 66 61 63 | 65 0d 46 69 6c 65 09 09 |Interfac|e.File..|
|00000100| 3a 09 47 55 53 49 5f 50 | 2e 68 09 09 09 2d 09 50 |:.GUSI_P|.h...-.P|
|00000110| 72 69 76 61 74 65 20 73 | 74 75 66 66 0d 41 75 74 |rivate s|tuff.Aut|
|00000120| 68 6f 72 09 3a 09 4d 61 | 74 74 68 69 61 73 20 4e |hor.:.Ma|tthias N|
|00000130| 65 65 72 61 63 68 65 72 | 0d 53 74 61 72 74 65 64 |eeracher|.Started|
|00000140| 09 3a 09 32 34 4d 61 72 | 39 32 09 09 09 09 09 09 |.:.24Mar|92......|
|00000150| 09 09 4c 61 6e 67 75 61 | 67 65 09 3a 09 4d 50 57 |..Langua|ge.:.MPW|
|00000160| 20 43 2f 43 2b 2b 0d 4d | 6f 64 69 66 69 65 64 09 | C/C++.M|odified.|
|00000170| 3a 09 31 38 41 70 72 39 | 32 09 4d 4e 09 70 70 63 |:.18Apr9|2.MN.ppc|
|00000180| 20 44 6f 6d 61 69 6e 0d | 09 09 09 09 31 38 41 70 | Domain.|....18Ap|
|00000190| 72 39 32 09 4d 4e 09 63 | 68 61 6e 67 65 64 20 72 |r92.MN.c|hanged r|
|000001a0| 65 61 64 2f 77 72 69 74 | 65 2f 73 65 6e 64 2f 72 |ead/writ|e/send/r|
|000001b0| 65 63 76 20 64 69 73 70 | 61 74 63 68 65 72 73 0d |ecv disp|atchers.|
|000001c0| 09 09 09 09 31 39 41 70 | 72 39 32 09 4d 4e 09 43 |....19Ap|r92.MN.C|
|000001d0| 2b 2b 20 72 65 77 72 69 | 74 65 0d 09 09 09 09 32 |++ rewri|te.....2|
|000001e0| 31 4d 61 79 39 32 09 4d | 4e 09 49 6d 70 6c 65 6d |1May92.M|N.Implem|
|000001f0| 65 6e 74 65 64 20 73 65 | 6c 65 63 74 28 29 0d 09 |ented se|lect()..|
|00000200| 09 09 09 30 37 4a 75 6e | 39 32 09 4d 4e 09 46 65 |...07Jun|92.MN.Fe|
|00000210| 61 74 75 72 65 0d 09 09 | 09 09 32 37 4a 75 6e 39 |ature...|..27Jun9|
|00000220| 32 09 4d 4e 09 63 68 6f | 6f 73 65 28 29 2c 20 68 |2.MN.cho|ose(), h|
|00000230| 61 73 4e 65 77 53 46 0d | 09 09 09 09 31 33 4a 75 |asNewSF.|....13Ju|
|00000240| 6c 39 32 09 4d 4e 09 4d | 61 6b 65 20 41 70 70 6c |l92.MN.M|ake Appl|
|00000250| 65 54 61 6c 6b 53 6f 63 | 6b 65 74 73 20 67 6c 6f |eTalkSoc|kets glo|
|00000260| 62 61 6c 0d 09 09 09 09 | 32 36 4a 75 6c 39 32 09 |bal.....|26Jul92.|
|00000270| 4d 4e 09 55 6e 69 78 53 | 6f 63 6b 65 74 73 2e 63 |MN.UnixS|ockets.c|
|00000280| 68 6f 6f 73 65 28 29 0d | 09 09 09 09 33 30 4a 75 |hoose().|....30Ju|
|00000290| 6c 39 32 09 4d 4e 09 49 | 6e 69 74 69 61 6c 69 7a |l92.MN.I|nitializ|
|000002a0| 65 72 20 46 65 61 74 75 | 72 65 73 0d 09 09 09 09 |er Featu|res.....|
|000002b0| 30 33 41 75 67 39 32 09 | 4d 4e 09 52 69 6e 67 42 |03Aug92.|MN.RingB|
|000002c0| 75 66 66 65 72 0d 09 09 | 09 09 33 30 41 75 67 39 |uffer...|..30Aug9|
|000002d0| 32 09 4d 4e 09 41 70 70 | 6c 65 54 61 6c 6b 49 64 |2.MN.App|leTalkId|
|000002e0| 65 6e 74 69 74 79 28 29 | 0d 09 09 09 09 31 33 53 |entity()|.....13S|
|000002f0| 65 70 39 32 09 4d 4e 09 | 53 50 49 4e 56 4f 49 44 |ep92.MN.|SPINVOID|
|00000300| 20 64 69 64 6e 27 74 20 | 72 65 74 75 72 6e 0d 09 | didn't |return..|
|00000310| 09 09 09 32 34 53 65 70 | 39 32 09 4d 4e 09 49 6e |...24Sep|92.MN.In|
|00000320| 63 6c 75 64 65 20 47 55 | 53 49 52 73 72 63 5f 50 |clude GU|SIRsrc_P|
|00000330| 2e 68 0d 09 09 09 09 30 | 33 4a 61 6e 39 33 09 4d |.h.....0|3Jan93.M|
|00000340| 4e 09 47 55 53 49 43 6f | 6e 66 69 67 0d 09 09 09 |N.GUSICo|nfig....|
|00000350| 09 31 37 4a 61 6e 39 33 | 09 4d 4e 09 53 41 46 45 |.17Jan93|.MN.SAFE|
|00000360| 53 50 49 4e 0d 09 09 09 | 09 31 37 4a 61 6e 39 33 |SPIN....|.17Jan93|
|00000370| 09 4d 4e 09 44 65 73 74 | 72 75 63 74 6f 72 73 20 |.MN.Dest|ructors |
|00000380| 66 6f 72 20 53 6f 63 6b | 65 74 64 6f 6d 61 69 6e |for Sock|etdomain|
|00000390| 0d 4c 61 73 74 09 09 3a | 09 31 37 4a 61 6e 39 33 |.Last..:|.17Jan93|
|000003a0| 0d 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.*******|********|
|000003b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003e0| 2a 2a 2a 2a 2a 2a 2f 0d | 0d 23 69 6e 63 6c 75 64 |******/.|.#includ|
|000003f0| 65 20 3c 47 55 53 49 2e | 68 3e 0d 23 69 6e 63 6c |e <GUSI.|h>.#incl|
|00000400| 75 64 65 20 3c 47 55 53 | 49 52 73 72 63 5f 50 2e |ude <GUS|IRsrc_P.|
|00000410| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 54 46 69 |h>.#incl|ude <TFi|
|00000420| 6c 65 53 70 65 63 2e 68 | 3e 0d 0d 65 78 74 65 72 |leSpec.h|>..exter|
|00000430| 6e 20 22 43 22 20 7b 0d | 0d 23 69 6e 63 6c 75 64 |n "C" {.|.#includ|
|00000440| 65 20 3c 73 79 73 2f 65 | 72 72 6e 6f 2e 68 3e 0d |e <sys/e|rrno.h>.|
|00000450| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 2f 75 69 |#include| <sys/ui|
|00000460| 6f 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 66 |o.h>.#in|clude <f|
|00000470| 63 6e 74 6c 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |cntl.h>.|#include|
|00000480| 20 3c 73 74 64 69 6f 2e | 68 3e 0d 23 69 6e 63 6c | <stdio.|h>.#incl|
|00000490| 75 64 65 20 3c 73 74 72 | 69 6e 67 2e 68 3e 0d 23 |ude <str|ing.h>.#|
|000004a0| 69 6e 63 6c 75 64 65 20 | 3c 61 73 73 65 72 74 2e |include |<assert.|
|000004b0| 68 3e 0d 0d 23 69 6e 63 | 6c 75 64 65 20 3c 4d 65 |h>..#inc|lude <Me|
|000004c0| 6d 6f 72 79 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |mory.h>.|#include|
|000004d0| 20 3c 47 65 73 74 61 6c | 74 45 71 75 2e 68 3e 0d | <Gestal|tEqu.h>.|
|000004e0| 23 69 6e 63 6c 75 64 65 | 20 3c 54 72 61 70 73 2e |#include| <Traps.|
|000004f0| 68 3e 0d 0d 69 6e 74 20 | 09 09 47 55 53 49 5f 65 |h>..int |..GUSI_e|
|00000500| 72 72 6f 72 28 69 6e 74 | 20 65 72 72 29 3b 0d 76 |rror(int| err);.v|
|00000510| 6f 69 64 20 2a 09 47 55 | 53 49 5f 65 72 72 6f 72 |oid *.GU|SI_error|
|00000520| 5f 6e 69 6c 28 69 6e 74 | 20 65 72 72 29 3b 0d 7d |_nil(int| err);.}|
|00000530| 0d 0d 23 70 72 61 67 6d | 61 20 73 65 67 6d 65 6e |..#pragm|a segmen|
|00000540| 74 20 47 55 53 49 0d 0d | 23 64 65 66 69 6e 65 20 |t GUSI..|#define |
|00000550| 47 55 53 49 52 73 72 63 | 49 44 09 09 09 09 31 30 |GUSIRsrc|ID....10|
|00000560| 32 34 30 0d 0d 23 64 65 | 66 69 6e 65 20 47 55 53 |240..#de|fine GUS|
|00000570| 49 5f 4d 41 58 5f 44 4f | 4d 41 49 4e 09 09 09 33 |I_MAX_DO|MAIN...3|
|00000580| 32 0d 23 64 65 66 69 6e | 65 20 44 45 46 41 55 4c |2.#defin|e DEFAUL|
|00000590| 54 5f 42 55 46 46 45 52 | 5f 53 49 5a 45 09 34 30 |T_BUFFER|_SIZE.40|
|000005a0| 39 36 0d 0d 2f 2a 0d 20 | 2a 09 49 6e 20 75 73 65 |96../*. |*.In use|
|000005b0| 20 61 6e 64 20 73 68 75 | 74 64 6f 77 6e 20 73 74 | and shu|tdown st|
|000005c0| 61 74 75 73 2e 0d 20 2a | 2f 0d 23 64 65 66 69 6e |atus.. *|/.#defin|
|000005d0| 65 09 53 4f 43 4b 5f 53 | 54 41 54 55 53 5f 55 53 |e.SOCK_S|TATUS_US|
|000005e0| 45 44 09 09 30 78 31 09 | 09 2f 2a 20 55 73 65 64 |ED..0x1.|./* Used|
|000005f0| 20 73 6f 63 6b 65 74 20 | 74 61 62 6c 65 20 65 6e | socket |table en|
|00000600| 74 72 79 20 2a 2f 0d 23 | 64 65 66 69 6e 65 09 53 |try */.#|define.S|
|00000610| 4f 43 4b 5f 53 54 41 54 | 55 53 5f 4e 4f 52 45 41 |OCK_STAT|US_NOREA|
|00000620| 44 09 30 78 32 09 09 2f | 2a 20 4e 6f 20 6d 6f 72 |D.0x2../|* No mor|
|00000630| 65 20 72 65 61 64 69 6e | 67 20 61 6c 6c 6f 77 65 |e readin|g allowe|
|00000640| 64 20 66 72 6f 6d 20 73 | 6f 63 6b 65 74 20 2a 2f |d from s|ocket */|
|00000650| 0d 23 64 65 66 69 6e 65 | 09 53 4f 43 4b 5f 53 54 |.#define|.SOCK_ST|
|00000660| 41 54 55 53 5f 4e 4f 57 | 52 49 54 45 09 30 78 34 |ATUS_NOW|RITE.0x4|
|00000670| 09 09 2f 2a 20 4e 6f 20 | 6d 6f 72 65 20 77 72 69 |../* No |more wri|
|00000680| 74 69 6e 67 20 61 6c 6c | 6f 77 65 64 20 74 6f 20 |ting all|owed to |
|00000690| 73 6f 63 6b 65 74 20 2a | 2f 0d 0d 2f 2a 0d 20 2a |socket *|/../*. *|
|000006a0| 09 53 6f 63 6b 65 74 20 | 63 6f 6e 6e 65 63 74 69 |.Socket |connecti|
|000006b0| 6f 6e 20 73 74 61 74 65 | 73 2e 0d 20 2a 2f 0d 23 |on state|s.. */.#|
|000006c0| 64 65 66 69 6e 65 09 53 | 4f 43 4b 5f 53 54 41 54 |define.S|OCK_STAT|
|000006d0| 45 5f 4e 4f 5f 53 54 52 | 45 41 4d 09 09 30 09 2f |E_NO_STR|EAM..0./|
|000006e0| 2a 20 53 6f 63 6b 65 74 | 20 64 6f 65 73 6e 27 74 |* Socket| doesn't|
|000006f0| 20 68 61 76 65 20 61 20 | 4d 61 63 54 43 50 20 73 | have a |MacTCP s|
|00000700| 74 72 65 61 6d 20 79 65 | 74 20 2a 2f 0d 23 64 65 |tream ye|t */.#de|
|00000710| 66 69 6e 65 09 53 4f 43 | 4b 5f 53 54 41 54 45 5f |fine.SOC|K_STATE_|
|00000720| 55 4e 43 4f 4e 4e 45 43 | 54 45 44 09 31 09 2f 2a |UNCONNEC|TED.1./*|
|00000730| 20 53 6f 63 6b 65 74 20 | 69 73 20 75 6e 63 6f 6e | Socket |is uncon|
|00000740| 6e 65 63 74 65 64 2e 20 | 2a 2f 0d 23 64 65 66 69 |nected. |*/.#defi|
|00000750| 6e 65 09 53 4f 43 4b 5f | 53 54 41 54 45 5f 4c 49 |ne.SOCK_|STATE_LI|
|00000760| 53 54 45 4e 49 4e 47 09 | 09 32 09 2f 2a 20 53 6f |STENING.|.2./* So|
|00000770| 63 6b 65 74 20 69 73 20 | 6c 69 73 74 65 6e 69 6e |cket is |listenin|
|00000780| 67 20 66 6f 72 20 63 6f | 6e 6e 65 63 74 69 6f 6e |g for co|nnection|
|00000790| 2e 20 2a 2f 0d 23 64 65 | 66 69 6e 65 09 53 4f 43 |. */.#de|fine.SOC|
|000007a0| 4b 5f 53 54 41 54 45 5f | 4c 49 53 5f 43 4f 4e 09 |K_STATE_|LIS_CON.|
|000007b0| 09 33 09 2f 2a 20 53 6f | 63 6b 65 74 20 69 73 20 |.3./* So|cket is |
|000007c0| 69 6e 20 74 72 61 6e 73 | 69 74 69 6f 6e 20 66 72 |in trans|ition fr|
|000007d0| 6f 6d 20 6c 69 73 74 65 | 6e 20 74 6f 20 63 6f 6e |om liste|n to con|
|000007e0| 6e 65 63 74 65 64 2e 20 | 2a 2f 0d 23 64 65 66 69 |nected. |*/.#defi|
|000007f0| 6e 65 09 53 4f 43 4b 5f | 53 54 41 54 45 5f 43 4f |ne.SOCK_|STATE_CO|
|00000800| 4e 4e 45 43 54 49 4e 47 | 09 34 09 2f 2a 20 53 6f |NNECTING|.4./* So|
|00000810| 63 6b 65 74 20 69 73 20 | 69 6e 69 74 69 61 74 69 |cket is |initiati|
|00000820| 6e 67 20 61 20 63 6f 6e | 6e 65 63 74 69 6f 6e 2e |ng a con|nection.|
|00000830| 20 2a 2f 0d 23 64 65 66 | 69 6e 65 09 53 4f 43 4b | */.#def|ine.SOCK|
|00000840| 5f 53 54 41 54 45 5f 43 | 4f 4e 4e 45 43 54 45 44 |_STATE_C|ONNECTED|
|00000850| 09 09 35 09 2f 2a 20 53 | 6f 63 6b 65 74 20 69 73 |..5./* S|ocket is|
|00000860| 20 63 6f 6e 6e 65 63 74 | 65 64 2e 20 2a 2f 0d 23 | connect|ed. */.#|
|00000870| 64 65 66 69 6e 65 09 53 | 4f 43 4b 5f 53 54 41 54 |define.S|OCK_STAT|
|00000880| 45 5f 43 4c 4f 53 49 4e | 47 20 20 20 20 20 20 36 |E_CLOSIN|G 6|
|00000890| 09 2f 2a 20 53 6f 63 6b | 65 74 20 69 73 20 63 6c |./* Sock|et is cl|
|000008a0| 6f 73 69 6e 67 20 2a 2f | 0d 0d 23 64 65 66 69 6e |osing */|..#defin|
|000008b0| 65 09 09 6d 69 6e 28 61 | 2c 62 29 09 09 09 09 28 |e..min(a|,b)....(|
|000008c0| 20 28 61 29 20 3c 20 28 | 62 29 20 3f 20 28 61 29 | (a) < (|b) ? (a)|
|000008d0| 20 3a 20 28 62 29 29 0d | 23 64 65 66 69 6e 65 09 | : (b)).|#define.|
|000008e0| 09 6d 61 78 28 61 2c 62 | 29 09 09 09 09 28 20 28 |.max(a,b|)....( (|
|000008f0| 61 29 20 3e 20 28 62 29 | 20 3f 20 28 61 29 20 3a |a) > (b)| ? (a) :|
|00000900| 20 28 62 29 29 0d 0d 65 | 78 74 65 72 6e 20 47 55 | (b))..e|xtern GU|
|00000910| 53 49 53 70 69 6e 46 6e | 20 73 70 69 6e 72 6f 75 |SISpinFn| spinrou|
|00000920| 74 69 6e 65 3b 0d 65 78 | 74 65 72 6e 20 69 6e 74 |tine;.ex|tern int|
|00000930| 20 47 55 53 49 44 65 66 | 61 75 6c 74 53 70 69 6e | GUSIDef|aultSpin|
|00000940| 28 73 70 69 6e 5f 6d 73 | 67 2c 20 6c 6f 6e 67 29 |(spin_ms|g, long)|
|00000950| 3b 0d 0d 2f 2a 20 53 50 | 49 4e 20 72 65 74 75 72 |;../* SP|IN retur|
|00000960| 6e 73 20 61 20 2d 31 20 | 6f 6e 20 75 73 65 72 20 |ns a -1 |on user |
|00000970| 63 61 6e 63 65 6c 20 66 | 6f 72 20 66 6e 20 72 65 |cancel f|or fn re|
|00000980| 74 75 72 6e 69 6e 67 20 | 69 6e 74 65 67 65 72 73 |turning |integers|
|00000990| 20 2a 2f 0d 23 64 65 66 | 69 6e 65 09 09 53 50 49 | */.#def|ine..SPI|
|000009a0| 4e 28 63 6f 6e 64 2c 6d | 65 73 67 2c 70 61 72 61 |N(cond,m|esg,para|
|000009b0| 6d 29 09 09 09 09 09 09 | 09 5c 0d 09 09 09 09 09 |m)......|.\......|
|000009c0| 64 6f 20 7b 09 09 09 09 | 09 09 09 09 09 09 09 09 |do {....|........|
|000009d0| 5c 0d 09 09 09 09 09 09 | 69 66 20 28 73 70 69 6e |\.......|if (spin|
|000009e0| 72 6f 75 74 69 6e 65 29 | 09 09 09 09 09 09 09 5c |routine)|.......\|
|000009f0| 0d 09 09 09 09 09 09 09 | 69 66 20 28 28 2a 73 70 |........|if ((*sp|
|00000a00| 69 6e 72 6f 75 74 69 6e | 65 29 28 6d 65 73 67 2c |inroutin|e)(mesg,|
|00000a10| 70 61 72 61 6d 29 29 09 | 5c 0d 09 09 09 09 09 09 |param)).|\.......|
|00000a20| 09 09 72 65 74 75 72 6e | 20 47 55 53 49 5f 65 72 |..return| GUSI_er|
|00000a30| 72 6f 72 28 45 49 4e 54 | 52 29 3b 09 09 5c 0d 09 |ror(EINT|R);..\..|
|00000a40| 09 09 09 09 7d 20 77 68 | 69 6c 65 28 63 6f 6e 64 |....} wh|ile(cond|
|00000a50| 29 0d 0d 2f 2a 20 53 50 | 49 4e 50 20 72 65 74 75 |)../* SP|INP retu|
|00000a60| 72 6e 73 20 61 20 4e 55 | 4c 4c 20 6f 6e 20 75 73 |rns a NU|LL on us|
|00000a70| 65 72 20 63 61 6e 63 65 | 6c 2c 20 66 6f 72 20 66 |er cance|l, for f|
|00000a80| 6e 20 72 65 74 75 72 6e | 69 6e 67 20 70 6f 69 6e |n return|ing poin|
|00000a90| 74 65 72 73 20 2a 2f 09 | 09 09 09 0d 23 64 65 66 |ters */.|....#def|
|00000aa0| 69 6e 65 09 09 53 50 49 | 4e 50 28 63 6f 6e 64 2c |ine..SPI|NP(cond,|
|00000ab0| 6d 65 73 67 2c 70 61 72 | 61 6d 29 09 09 09 09 09 |mesg,par|am).....|
|00000ac0| 09 09 5c 0d 09 09 09 09 | 09 64 6f 20 7b 09 09 09 |..\.....|.do {...|
|00000ad0| 09 09 09 09 09 09 09 09 | 09 5c 0d 09 09 09 09 09 |........|.\......|
|00000ae0| 09 69 66 20 28 73 70 69 | 6e 72 6f 75 74 69 6e 65 |.if (spi|nroutine|
|00000af0| 29 09 09 09 09 09 09 09 | 5c 0d 09 09 09 09 09 09 |).......|\.......|
|00000b00| 09 69 66 20 28 28 2a 73 | 70 69 6e 72 6f 75 74 69 |.if ((*s|pinrouti|
|00000b10| 6e 65 29 28 6d 65 73 67 | 2c 70 61 72 61 6d 29 29 |ne)(mesg|,param))|
|00000b20| 20 7b 5c 0d 09 09 09 09 | 09 09 09 09 47 55 53 49 | {\.....|....GUSI|
|00000b30| 5f 65 72 72 6f 72 28 45 | 49 4e 54 52 29 3b 09 09 |_error(E|INTR);..|
|00000b40| 09 09 5c 0d 09 09 09 09 | 09 09 09 09 72 65 74 75 |..\.....|....retu|
|00000b50| 72 6e 20 4e 55 4c 4c 3b | 09 09 09 09 09 09 5c 0d |rn NULL;|......\.|
|00000b60| 09 09 09 09 09 09 09 7d | 09 09 09 09 09 09 09 09 |.......}|........|
|00000b70| 09 09 09 5c 0d 09 09 09 | 09 09 7d 20 77 68 69 6c |...\....|..} whil|
|00000b80| 65 28 63 6f 6e 64 29 0d | 0d 2f 2a 20 53 50 49 4e |e(cond).|./* SPIN|
|00000b90| 56 4f 49 44 20 6a 75 73 | 74 20 72 65 74 75 72 6e |VOID jus|t return|
|00000ba0| 73 20 6f 6e 20 75 73 65 | 72 20 63 61 6e 63 65 6c |s on use|r cancel|
|00000bb0| 2c 20 66 6f 72 20 66 6e | 20 72 65 74 75 72 6e 69 |, for fn| returni|
|00000bc0| 6e 67 20 76 6f 69 64 20 | 2a 2f 09 09 09 09 0d 23 |ng void |*/.....#|
|00000bd0| 64 65 66 69 6e 65 09 09 | 53 50 49 4e 56 4f 49 44 |define..|SPINVOID|
|00000be0| 28 63 6f 6e 64 2c 6d 65 | 73 67 2c 70 61 72 61 6d |(cond,me|sg,param|
|00000bf0| 29 09 09 09 09 09 09 5c | 0d 09 09 09 09 09 64 6f |)......\|......do|
|00000c00| 20 7b 09 09 09 09 09 09 | 09 09 09 09 09 09 5c 0d | {......|......\.|
|00000c10| 09 09 09 09 09 09 69 66 | 20 28 73 70 69 6e 72 6f |......if| (spinro|
|00000c20| 75 74 69 6e 65 29 09 09 | 09 09 09 09 09 5c 0d 09 |utine)..|.....\..|
|00000c30| 09 09 09 09 09 09 69 66 | 20 28 28 2a 73 70 69 6e |......if| ((*spin|
|00000c40| 72 6f 75 74 69 6e 65 29 | 28 6d 65 73 67 2c 70 61 |routine)|(mesg,pa|
|00000c50| 72 61 6d 29 29 20 7b 5c | 0d 09 09 09 09 09 09 09 |ram)) {\|........|
|00000c60| 09 47 55 53 49 5f 65 72 | 72 6f 72 28 45 49 4e 54 |.GUSI_er|ror(EINT|
|00000c70| 52 29 3b 09 09 09 09 5c | 0d 09 09 09 09 09 09 09 |R);....\|........|
|00000c80| 09 72 65 74 75 72 6e 3b | 09 09 09 09 09 09 09 09 |.return;|........|
|00000c90| 5c 0d 09 09 09 09 09 09 | 09 7d 09 09 09 09 09 09 |\.......|.}......|
|00000ca0| 09 09 09 09 09 5c 0d 09 | 09 09 09 09 7d 20 77 68 |.....\..|....} wh|
|00000cb0| 69 6c 65 28 63 6f 6e 64 | 29 0d 09 09 09 09 09 0d |ile(cond|).......|
|00000cc0| 2f 2a 20 53 41 46 45 53 | 50 49 4e 20 64 6f 65 73 |/* SAFES|PIN does|
|00000cd0| 6e 27 74 20 72 65 74 75 | 72 6e 2c 20 79 6f 75 20 |n't retu|rn, you |
|00000ce0| 68 61 76 65 20 74 6f 20 | 63 68 65 63 6b 20 65 72 |have to |check er|
|00000cf0| 72 6e 6f 20 2a 2f 09 09 | 09 09 0d 23 64 65 66 69 |rno */..|...#defi|
|00000d00| 6e 65 09 09 53 41 46 45 | 53 50 49 4e 28 63 6f 6e |ne..SAFE|SPIN(con|
|00000d10| 64 2c 6d 65 73 67 2c 70 | 61 72 61 6d 29 09 09 09 |d,mesg,p|aram)...|
|00000d20| 09 09 09 5c 0d 09 09 09 | 09 09 64 6f 20 7b 09 09 |...\....|..do {..|
|00000d30| 09 09 09 09 09 09 09 09 | 09 09 5c 0d 09 09 09 09 |........|..\.....|
|00000d40| 09 09 69 66 20 28 73 70 | 69 6e 72 6f 75 74 69 6e |..if (sp|inroutin|
|00000d50| 65 29 09 09 09 09 09 09 | 09 5c 0d 09 09 09 09 09 |e)......|.\......|
|00000d60| 09 09 69 66 20 28 28 2a | 73 70 69 6e 72 6f 75 74 |..if ((*|spinrout|
|00000d70| 69 6e 65 29 28 6d 65 73 | 67 2c 70 61 72 61 6d 29 |ine)(mes|g,param)|
|00000d80| 29 20 7b 5c 0d 09 09 09 | 09 09 09 09 09 47 55 53 |) {\....|.....GUS|
|00000d90| 49 5f 65 72 72 6f 72 28 | 45 49 4e 54 52 29 3b 09 |I_error(|EINTR);.|
|00000da0| 09 09 09 5c 0d 09 09 09 | 09 09 09 09 09 62 72 65 |...\....|.....bre|
|00000db0| 61 6b 3b 09 09 09 09 09 | 09 09 09 5c 0d 09 09 09 |ak;.....|...\....|
|00000dc0| 09 09 09 09 7d 20 65 6c | 73 65 20 7b 09 09 09 09 |....} el|se {....|
|00000dd0| 09 09 09 09 09 5c 0d 09 | 09 09 09 09 09 09 09 65 |.....\..|.......e|
|00000de0| 72 72 6e 6f 20 3d 20 30 | 3b 09 09 09 09 09 09 09 |rrno = 0|;.......|
|00000df0| 5c 0d 09 09 09 09 09 09 | 09 7d 09 09 09 09 09 09 |\.......|.}......|
|00000e00| 09 09 09 09 09 5c 0d 09 | 09 09 09 09 09 65 6c 73 |.....\..|.....els|
|00000e10| 65 09 09 09 09 09 09 09 | 09 09 09 09 5c 0d 09 09 |e.......|....\...|
|00000e20| 09 09 09 09 09 65 72 72 | 6e 6f 20 3d 20 30 3b 09 |.....err|no = 0;.|
|00000e30| 09 09 09 09 09 09 09 5c | 0d 09 09 09 09 09 7d 20 |.......\|......} |
|00000e40| 77 68 69 6c 65 28 63 6f | 6e 64 29 0d 09 09 09 09 |while(co|nd).....|
|00000e50| 09 0d 63 6c 61 73 73 20 | 53 6f 63 6b 65 74 54 61 |..class |SocketTa|
|00000e60| 62 6c 65 3b 0d 0d 63 6c | 61 73 73 20 53 6f 63 6b |ble;..cl|ass Sock|
|00000e70| 65 74 20 7b 0d 09 66 72 | 69 65 6e 64 20 63 6c 61 |et {..fr|iend cla|
|00000e80| 73 73 20 53 6f 63 6b 65 | 74 54 61 62 6c 65 3b 0d |ss Socke|tTable;.|
|00000e90| 09 0d 09 69 6e 74 09 72 | 65 66 43 6f 75 6e 74 3b |...int.r|efCount;|
|00000ea0| 0d 70 72 6f 74 65 63 74 | 65 64 3a 0d 09 09 09 09 |.protect|ed:.....|
|00000eb0| 09 53 6f 63 6b 65 74 28 | 29 3b 0d 70 75 62 6c 69 |.Socket(|);.publi|
|00000ec0| 63 3a 0d 09 76 69 72 74 | 75 61 6c 20 69 6e 74 09 |c:..virt|ual int.|
|00000ed0| 62 69 6e 64 28 76 6f 69 | 64 20 2a 20 6e 61 6d 65 |bind(voi|d * name|
|00000ee0| 2c 20 69 6e 74 20 6e 61 | 6d 65 6c 65 6e 29 3b 0d |, int na|melen);.|
|00000ef0| 09 76 69 72 74 75 61 6c | 20 69 6e 74 20 63 6f 6e |.virtual| int con|
|00000f00| 6e 65 63 74 28 76 6f 69 | 64 20 2a 20 61 64 64 72 |nect(voi|d * addr|
|00000f10| 65 73 73 2c 20 69 6e 74 | 20 61 64 64 72 6c 65 6e |ess, int| addrlen|
|00000f20| 29 3b 0d 09 76 69 72 74 | 75 61 6c 20 69 6e 74 20 |);..virt|ual int |
|00000f30| 6c 69 73 74 65 6e 28 69 | 6e 74 20 71 6c 65 6e 29 |listen(i|nt qlen)|
|00000f40| 3b 0d 09 76 69 72 74 75 | 61 6c 20 53 6f 63 6b 65 |;..virtu|al Socke|
|00000f50| 74 20 2a 20 61 63 63 65 | 70 74 28 76 6f 69 64 20 |t * acce|pt(void |
|00000f60| 2a 20 61 64 64 72 65 73 | 73 2c 20 69 6e 74 20 2a |* addres|s, int *|
|00000f70| 20 61 64 64 72 6c 65 6e | 29 3b 0d 09 76 69 72 74 | addrlen|);..virt|
|00000f80| 75 61 6c 20 69 6e 74 09 | 72 65 61 64 28 76 6f 69 |ual int.|read(voi|
|00000f90| 64 20 2a 20 62 75 66 66 | 65 72 2c 20 69 6e 74 20 |d * buff|er, int |
|00000fa0| 62 75 66 6c 65 6e 29 3b | 0d 09 76 69 72 74 75 61 |buflen);|..virtua|
|00000fb0| 6c 20 69 6e 74 20 77 72 | 69 74 65 28 76 6f 69 64 |l int wr|ite(void|
|00000fc0| 20 2a 20 62 75 66 66 65 | 72 2c 20 69 6e 74 20 62 | * buffe|r, int b|
|00000fd0| 75 66 6c 65 6e 29 3b 0d | 09 76 69 72 74 75 61 6c |uflen);.|.virtual|
|00000fe0| 20 69 6e 74 20 72 65 63 | 76 66 72 6f 6d 28 76 6f | int rec|vfrom(vo|
|00000ff0| 69 64 20 2a 20 62 75 66 | 66 65 72 2c 20 69 6e 74 |id * buf|fer, int|
|00001000| 20 62 75 66 6c 65 6e 2c | 20 69 6e 74 20 66 6c 61 | buflen,| int fla|
|00001010| 67 73 2c 20 76 6f 69 64 | 20 2a 20 66 72 6f 6d 2c |gs, void| * from,|
|00001020| 20 69 6e 74 20 2a 20 66 | 72 6f 6d 6c 65 6e 29 3b | int * f|romlen);|
|00001030| 0d 09 76 69 72 74 75 61 | 6c 20 69 6e 74 20 73 65 |..virtua|l int se|
|00001040| 6e 64 74 6f 28 76 6f 69 | 64 20 2a 20 62 75 66 66 |ndto(voi|d * buff|
|00001050| 65 72 2c 20 69 6e 74 20 | 62 75 66 6c 65 6e 2c 20 |er, int |buflen, |
|00001060| 69 6e 74 20 66 6c 61 67 | 73 2c 20 76 6f 69 64 20 |int flag|s, void |
|00001070| 2a 20 74 6f 2c 20 69 6e | 74 20 74 6f 6c 65 6e 29 |* to, in|t tolen)|
|00001080| 3b 0d 09 76 69 72 74 75 | 61 6c 20 69 6e 74 20 67 |;..virtu|al int g|
|00001090| 65 74 73 6f 63 6b 6e 61 | 6d 65 28 76 6f 69 64 20 |etsockna|me(void |
|000010a0| 2a 20 6e 61 6d 65 2c 20 | 69 6e 74 20 2a 20 6e 61 |* name, |int * na|
|000010b0| 6d 65 6c 65 6e 29 3b 0d | 09 76 69 72 74 75 61 6c |melen);.|.virtual|
|000010c0| 20 69 6e 74 20 67 65 74 | 70 65 65 72 6e 61 6d 65 | int get|peername|
|000010d0| 28 76 6f 69 64 20 2a 20 | 6e 61 6d 65 2c 20 69 6e |(void * |name, in|
|000010e0| 74 20 2a 20 6e 61 6d 65 | 6c 65 6e 29 3b 0d 09 76 |t * name|len);..v|
|000010f0| 69 72 74 75 61 6c 20 69 | 6e 74 20 67 65 74 73 6f |irtual i|nt getso|
|00001100| 63 6b 6f 70 74 28 69 6e | 74 20 6c 65 76 65 6c 2c |ckopt(in|t level,|
|00001110| 20 69 6e 74 20 6f 70 74 | 6e 61 6d 65 2c 20 63 68 | int opt|name, ch|
|00001120| 61 72 20 2a 6f 70 74 76 | 61 6c 2c 20 69 6e 74 20 |ar *optv|al, int |
|00001130| 2a 20 6f 70 74 6c 65 6e | 29 3b 0d 09 76 69 72 74 |* optlen|);..virt|
|00001140| 75 61 6c 20 69 6e 74 20 | 73 65 74 73 6f 63 6b 6f |ual int |setsocko|
|00001150| 70 74 28 69 6e 74 20 6c | 65 76 65 6c 2c 20 69 6e |pt(int l|evel, in|
|00001160| 74 20 6f 70 74 6e 61 6d | 65 2c 20 63 68 61 72 20 |t optnam|e, char |
|00001170| 2a 6f 70 74 76 61 6c 2c | 20 69 6e 74 20 6f 70 74 |*optval,| int opt|
|00001180| 6c 65 6e 29 3b 0d 09 76 | 69 72 74 75 61 6c 20 69 |len);..v|irtual i|
|00001190| 6e 74 09 66 63 6e 74 6c | 28 75 6e 73 69 67 6e 65 |nt.fcntl|(unsigne|
|000011a0| 64 20 69 6e 74 20 63 6d | 64 2c 20 69 6e 74 20 61 |d int cm|d, int a|
|000011b0| 72 67 29 3b 0d 09 76 69 | 72 74 75 61 6c 20 69 6e |rg);..vi|rtual in|
|000011c0| 74 09 69 6f 63 74 6c 28 | 75 6e 73 69 67 6e 65 64 |t.ioctl(|unsigned|
|000011d0| 20 69 6e 74 20 72 65 71 | 75 65 73 74 2c 20 76 6f | int req|uest, vo|
|000011e0| 69 64 20 2a 61 72 67 70 | 29 3b 0d 09 76 69 72 74 |id *argp|);..virt|
|000011f0| 75 61 6c 20 69 6e 74 09 | 66 73 74 61 74 28 73 74 |ual int.|fstat(st|
|00001200| 72 75 63 74 20 73 74 61 | 74 20 2a 20 62 75 66 29 |ruct sta|t * buf)|
|00001210| 3b 0d 09 76 69 72 74 75 | 61 6c 20 6c 6f 6e 67 20 |;..virtu|al long |
|00001220| 6c 73 65 65 6b 28 6c 6f | 6e 67 20 6f 66 66 73 65 |lseek(lo|ng offse|
|00001230| 74 2c 20 69 6e 74 20 77 | 68 65 6e 63 65 29 3b 0d |t, int w|hence);.|
|00001240| 09 76 69 72 74 75 61 6c | 20 69 6e 74 09 69 73 61 |.virtual| int.isa|
|00001250| 74 74 79 28 29 3b 0d 09 | 76 69 72 74 75 61 6c 20 |tty();..|virtual |
|00001260| 69 6e 74 20 73 68 75 74 | 64 6f 77 6e 28 69 6e 74 |int shut|down(int|
|00001270| 20 68 6f 77 29 3b 0d 09 | 76 69 72 74 75 61 6c 20 | how);..|virtual |
|00001280| 69 6e 74 20 73 65 6c 65 | 63 74 28 42 6f 6f 6c 65 |int sele|ct(Boole|
|00001290| 61 6e 20 2a 20 63 61 6e | 52 65 61 64 2c 20 42 6f |an * can|Read, Bo|
|000012a0| 6f 6c 65 61 6e 20 2a 20 | 63 61 6e 57 72 69 74 65 |olean * |canWrite|
|000012b0| 2c 20 42 6f 6f 6c 65 61 | 6e 20 2a 20 65 78 63 65 |, Boolea|n * exce|
|000012c0| 70 74 69 6f 6e 29 3b 0d | 09 76 69 72 74 75 61 6c |ption);.|.virtual|
|000012d0| 20 09 09 7e 53 6f 63 6b | 65 74 28 29 3b 0d 7d 3b | ..~Sock|et();.};|
|000012e0| 0d 0d 63 6c 61 73 73 20 | 53 6f 63 6b 65 74 44 6f |..class |SocketDo|
|000012f0| 6d 61 69 6e 20 7b 0d 09 | 73 74 61 74 69 63 20 53 |main {..|static S|
|00001300| 6f 63 6b 65 74 44 6f 6d | 61 69 6e 20 2a 09 64 6f |ocketDom|ain *.do|
|00001310| 6d 61 69 6e 73 5b 47 55 | 53 49 5f 4d 41 58 5f 44 |mains[GU|SI_MAX_D|
|00001320| 4f 4d 41 49 4e 5d 3b 0d | 70 72 6f 74 65 63 74 65 |OMAIN];.|protecte|
|00001330| 64 3a 0d 09 53 6f 63 6b | 65 74 44 6f 6d 61 69 6e |d:..Sock|etDomain|
|00001340| 28 69 6e 74 20 64 6f 6d | 61 69 6e 29 3b 0d 09 76 |(int dom|ain);..v|
|00001350| 69 72 74 75 61 6c 20 7e | 53 6f 63 6b 65 74 44 6f |irtual ~|SocketDo|
|00001360| 6d 61 69 6e 28 29 3b 0d | 70 75 62 6c 69 63 3a 0d |main();.|public:.|
|00001370| 09 69 6e 6c 69 6e 65 20 | 73 74 61 74 69 63 20 53 |.inline |static S|
|00001380| 6f 63 6b 65 74 44 6f 6d | 61 69 6e 20 2a 09 44 6f |ocketDom|ain *.Do|
|00001390| 6d 61 69 6e 28 69 6e 74 | 20 64 6f 6d 61 69 6e 29 |main(int| domain)|
|000013a0| 3b 0d 09 0d 09 2f 2f 20 | 4f 76 65 72 72 69 64 65 |;....// |Override|
|000013b0| 20 2a 6f 6e 65 2a 20 6f | 66 20 74 68 65 20 66 6f | *one* o|f the fo|
|000013c0| 6c 6c 6f 77 69 6e 67 20 | 74 77 6f 0d 09 0d 09 76 |llowing |two....v|
|000013d0| 69 72 74 75 61 6c 20 53 | 6f 63 6b 65 74 20 2a 20 |irtual S|ocket * |
|000013e0| 6f 70 65 6e 28 63 6f 6e | 73 74 20 63 68 61 72 20 |open(con|st char |
|000013f0| 2a 20 66 69 6c 65 6e 61 | 6d 65 2c 20 69 6e 74 20 |* filena|me, int |
|00001400| 6f 66 6c 61 67 29 3b 0d | 09 76 69 72 74 75 61 6c |oflag);.|.virtual|
|00001410| 20 53 6f 63 6b 65 74 20 | 2a 20 73 6f 63 6b 65 74 | Socket |* socket|
|00001420| 28 69 6e 74 20 74 79 70 | 65 2c 20 73 68 6f 72 74 |(int typ|e, short|
|00001430| 20 70 72 6f 74 6f 63 6f | 6c 29 3b 0d 09 76 69 72 | protoco|l);..vir|
|00001440| 74 75 61 6c 20 69 6e 74 | 20 63 68 6f 6f 73 65 28 |tual int| choose(|
|00001450| 0d 09 09 09 09 09 09 69 | 6e 74 20 09 09 74 79 70 |.......i|nt ..typ|
|00001460| 65 2c 20 0d 09 09 09 09 | 09 09 63 68 61 72 20 2a |e, .....|..char *|
|00001470| 20 09 70 72 6f 6d 70 74 | 2c 20 0d 09 09 09 09 09 | .prompt|, ......|
|00001480| 09 76 6f 69 64 20 2a 20 | 09 63 6f 6e 73 74 72 61 |.void * |.constra|
|00001490| 69 6e 74 2c 09 09 0d 09 | 09 09 09 09 09 69 6e 74 |int,....|.....int|
|000014a0| 20 09 09 66 6c 61 67 73 | 2c 0d 20 09 09 09 09 09 | ..flags|,. .....|
|000014b0| 09 76 6f 69 64 20 2a 20 | 09 6e 61 6d 65 2c 20 0d |.void * |.name, .|
|000014c0| 09 09 09 09 09 09 69 6e | 74 20 2a 20 09 6e 61 6d |......in|t * .nam|
|000014d0| 65 6c 65 6e 29 3b 0d 7d | 3b 0d 0d 63 6c 61 73 73 |elen);.}|;..class|
|000014e0| 20 53 6f 63 6b 65 74 54 | 61 62 6c 65 20 7b 0d 09 | SocketT|able {..|
|000014f0| 53 6f 63 6b 65 74 20 2a | 09 73 6f 63 6b 65 74 73 |Socket *|.sockets|
|00001500| 5b 47 55 53 49 5f 4d 41 | 58 5f 46 44 5d 3b 0d 70 |[GUSI_MA|X_FD];.p|
|00001510| 75 62 6c 69 63 3a 0d 09 | 53 6f 63 6b 65 74 54 61 |ublic:..|SocketTa|
|00001520| 62 6c 65 28 29 3b 0d 09 | 7e 53 6f 63 6b 65 74 54 |ble();..|~SocketT|
|00001530| 61 62 6c 65 28 29 3b 0d | 09 0d 09 69 6e 74 09 09 |able();.|...int..|
|00001540| 49 6e 73 74 61 6c 6c 28 | 53 6f 63 6b 65 74 20 2a |Install(|Socket *|
|00001550| 20 73 6f 63 6b 2c 20 69 | 6e 74 20 73 74 61 72 74 | sock, i|nt start|
|00001560| 20 3d 20 30 29 3b 0d 09 | 69 6e 74 09 09 52 65 6d | = 0);..|int..Rem|
|00001570| 6f 76 65 28 69 6e 74 20 | 66 64 29 3b 0d 09 53 6f |ove(int |fd);..So|
|00001580| 63 6b 65 74 20 2a 20 6f | 70 65 72 61 74 6f 72 5b |cket * o|perator[|
|00001590| 5d 28 69 6e 74 20 66 64 | 29 3b 0d 7d 3b 0d 0d 63 |](int fd|);.};..c|
|000015a0| 6c 61 73 73 20 46 69 6c | 65 53 6f 63 6b 65 74 44 |lass Fil|eSocketD|
|000015b0| 6f 6d 61 69 6e 20 3a 20 | 70 75 62 6c 69 63 20 53 |omain : |public S|
|000015c0| 6f 63 6b 65 74 44 6f 6d | 61 69 6e 20 7b 0d 09 66 |ocketDom|ain {..f|
|000015d0| 72 69 65 6e 64 20 53 6f | 63 6b 65 74 54 61 62 6c |riend So|cketTabl|
|000015e0| 65 3a 3a 53 6f 63 6b 65 | 74 54 61 62 6c 65 28 29 |e::Socke|tTable()|
|000015f0| 3b 0d 09 0d 09 76 69 72 | 74 75 61 6c 20 53 6f 63 |;....vir|tual Soc|
|00001600| 6b 65 74 20 2a 20 73 74 | 64 6f 70 65 6e 28 69 6e |ket * st|dopen(in|
|00001610| 74 20 66 64 29 3b 0d 70 | 75 62 6c 69 63 3a 0d 09 |t fd);.p|ublic:..|
|00001620| 46 69 6c 65 53 6f 63 6b | 65 74 44 6f 6d 61 69 6e |FileSock|etDomain|
|00001630| 28 29 09 3a 09 53 6f 63 | 6b 65 74 44 6f 6d 61 69 |().:.Soc|ketDomai|
|00001640| 6e 28 41 46 5f 46 49 4c | 45 29 09 7b 09 09 7d 0d |n(AF_FIL|E).{..}.|
|00001650| 0d 09 76 69 72 74 75 61 | 6c 20 53 6f 63 6b 65 74 |..virtua|l Socket|
|00001660| 20 2a 20 6f 70 65 6e 28 | 63 6f 6e 73 74 20 63 68 | * open(|const ch|
|00001670| 61 72 20 2a 20 66 69 6c | 65 6e 61 6d 65 2c 20 69 |ar * fil|ename, i|
|00001680| 6e 74 20 6f 66 6c 61 67 | 29 3b 0d 09 76 69 72 74 |nt oflag|);..virt|
|00001690| 75 61 6c 20 69 6e 74 20 | 63 68 6f 6f 73 65 28 0d |ual int |choose(.|
|000016a0| 09 09 09 09 09 09 69 6e | 74 20 09 09 74 79 70 65 |......in|t ..type|
|000016b0| 2c 20 0d 09 09 09 09 09 | 09 63 68 61 72 20 2a 20 |, ......|.char * |
|000016c0| 09 70 72 6f 6d 70 74 2c | 20 0d 09 09 09 09 09 09 |.prompt,| .......|
|000016d0| 76 6f 69 64 20 2a 20 09 | 63 6f 6e 73 74 72 61 69 |void * .|constrai|
|000016e0| 6e 74 2c 09 09 0d 09 09 | 09 09 09 09 69 6e 74 20 |nt,.....|....int |
|000016f0| 09 09 66 6c 61 67 73 2c | 0d 20 09 09 09 09 09 09 |..flags,|. ......|
|00001700| 76 6f 69 64 20 2a 20 09 | 6e 61 6d 65 2c 20 0d 09 |void * .|name, ..|
|00001710| 09 09 09 09 09 69 6e 74 | 20 2a 20 09 6e 61 6d 65 |.....int| * .name|
|00001720| 6c 65 6e 29 3b 0d 7d 3b | 0d 0d 63 6c 61 73 73 20 |len);.};|..class |
|00001730| 41 70 70 6c 65 54 61 6c | 6b 53 6f 63 6b 65 74 44 |AppleTal|kSocketD|
|00001740| 6f 6d 61 69 6e 20 3a 20 | 70 75 62 6c 69 63 20 53 |omain : |public S|
|00001750| 6f 63 6b 65 74 44 6f 6d | 61 69 6e 20 7b 0d 09 73 |ocketDom|ain {..s|
|00001760| 68 6f 72 74 09 09 09 09 | 09 09 64 73 70 52 65 66 |hort....|..dspRef|
|00001770| 4e 75 6d 3b 0d 09 0d 09 | 76 6f 69 64 09 09 09 09 |Num;....|void....|
|00001780| 09 09 44 6f 4d 50 50 4f | 70 65 6e 28 29 3b 0d 70 |..DoMPPO|pen();.p|
|00001790| 75 62 6c 69 63 3a 0d 09 | 41 70 70 6c 65 54 61 6c |ublic:..|AppleTal|
|000017a0| 6b 53 6f 63 6b 65 74 44 | 6f 6d 61 69 6e 28 29 3b |kSocketD|omain();|
|000017b0| 0d 09 0d 09 41 64 64 72 | 42 6c 6f 63 6b 09 09 09 |....Addr|Block...|
|000017c0| 09 6e 6f 64 65 3b 0d 09 | 0d 09 09 09 09 73 68 6f |.node;..|.....sho|
|000017d0| 72 74 09 09 09 47 65 74 | 44 53 50 28 29 3b 09 09 |rt...Get|DSP();..|
|000017e0| 0d 09 09 09 09 42 6f 6f | 6c 65 61 6e 09 09 56 61 |.....Boo|lean..Va|
|000017f0| 6c 69 64 61 74 65 28 29 | 3b 0d 09 76 69 72 74 75 |lidate()|;..virtu|
|00001800| 61 6c 09 53 6f 63 6b 65 | 74 20 2a 20 09 73 6f 63 |al.Socke|t * .soc|
|00001810| 6b 65 74 28 69 6e 74 20 | 74 79 70 65 2c 20 73 68 |ket(int |type, sh|
|00001820| 6f 72 74 20 70 72 6f 74 | 6f 63 6f 6c 29 3b 0d 09 |ort prot|ocol);..|
|00001830| 76 69 72 74 75 61 6c 20 | 69 6e 74 20 63 68 6f 6f |virtual |int choo|
|00001840| 73 65 28 0d 09 09 09 09 | 09 09 69 6e 74 20 09 09 |se(.....|..int ..|
|00001850| 74 79 70 65 2c 20 0d 09 | 09 09 09 09 09 63 68 61 |type, ..|.....cha|
|00001860| 72 20 2a 20 09 70 72 6f | 6d 70 74 2c 20 0d 09 09 |r * .pro|mpt, ...|
|00001870| 09 09 09 09 76 6f 69 64 | 20 2a 20 09 63 6f 6e 73 |....void| * .cons|
|00001880| 74 72 61 69 6e 74 2c 09 | 09 0d 09 09 09 09 09 09 |traint,.|........|
|00001890| 69 6e 74 20 09 09 66 6c | 61 67 73 2c 0d 20 09 09 |int ..fl|ags,. ..|
|000018a0| 09 09 09 09 76 6f 69 64 | 20 2a 20 09 6e 61 6d 65 |....void| * .name|
|000018b0| 2c 20 0d 09 09 09 09 09 | 09 69 6e 74 20 2a 20 09 |, ......|.int * .|
|000018c0| 6e 61 6d 65 6c 65 6e 29 | 3b 0d 7d 3b 0d 0d 63 6c |namelen)|;.};..cl|
|000018d0| 61 73 73 20 47 55 53 49 | 43 6f 6e 66 69 67 75 72 |ass GUSI|Configur|
|000018e0| 61 74 69 6f 6e 20 7b 0d | 09 4f 53 54 79 70 65 09 |ation {.|.OSType.|
|000018f0| 64 65 66 61 75 6c 74 54 | 79 70 65 3b 0d 09 4f 53 |defaultT|ype;..OS|
|00001900| 54 79 70 65 09 64 65 66 | 61 75 6c 74 43 72 65 61 |Type.def|aultCrea|
|00001910| 74 6f 72 3b 0d 09 42 6f | 6f 6c 65 61 6e 09 61 75 |tor;..Bo|olean.au|
|00001920| 74 6f 53 70 69 6e 3b 0d | 70 75 62 6c 69 63 3a 0d |toSpin;.|public:.|
|00001930| 09 47 55 53 49 43 6f 6e | 66 69 67 75 72 61 74 69 |.GUSICon|figurati|
|00001940| 6f 6e 28 29 3b 0d 09 0d | 09 76 6f 69 64 20 53 65 |on();...|.void Se|
|00001950| 74 44 65 66 61 75 6c 74 | 46 54 79 70 65 28 63 6f |tDefault|FType(co|
|00001960| 6e 73 74 20 54 46 69 6c | 65 53 70 65 63 20 26 20 |nst TFil|eSpec & |
|00001970| 6e 61 6d 65 29 20 63 6f | 6e 73 74 3b 0d 09 76 6f |name) co|nst;..vo|
|00001980| 69 64 20 44 6f 41 75 74 | 6f 53 70 69 6e 28 29 20 |id DoAut|oSpin() |
|00001990| 63 6f 6e 73 74 3b 0d 09 | 76 6f 69 64 20 53 75 73 |const;..|void Sus|
|000019a0| 70 65 6e 64 53 70 69 6e | 28 29 20 63 6f 6e 73 74 |pendSpin|() const|
|000019b0| 3b 0d 09 76 6f 69 64 20 | 52 65 73 75 6d 65 53 70 |;..void |ResumeSp|
|000019c0| 69 6e 28 29 20 63 6f 6e | 73 74 3b 0d 7d 3b 0d 0d |in() con|st;.};..|
|000019d0| 65 78 74 65 72 6e 20 63 | 6f 6e 73 74 20 47 55 53 |extern c|onst GUS|
|000019e0| 49 43 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 09 47 |IConfigu|ration.G|
|000019f0| 55 53 49 43 6f 6e 66 69 | 67 3b 0d 65 78 74 65 72 |USIConfi|g;.exter|
|00001a00| 6e 20 53 6f 63 6b 65 74 | 54 61 62 6c 65 09 09 09 |n Socket|Table...|
|00001a10| 09 09 53 6f 63 6b 65 74 | 73 3b 0d 65 78 74 65 72 |..Socket|s;.exter|
|00001a20| 6e 20 46 69 6c 65 53 6f | 63 6b 65 74 44 6f 6d 61 |n FileSo|cketDoma|
|00001a30| 69 6e 20 09 09 09 46 69 | 6c 65 53 6f 63 6b 65 74 |in ...Fi|leSocket|
|00001a40| 73 3b 0d 65 78 74 65 72 | 6e 20 41 70 70 6c 65 54 |s;.exter|n AppleT|
|00001a50| 61 6c 6b 53 6f 63 6b 65 | 74 44 6f 6d 61 69 6e 09 |alkSocke|tDomain.|
|00001a60| 09 41 70 70 6c 65 54 61 | 6c 6b 53 6f 63 6b 65 74 |.AppleTa|lkSocket|
|00001a70| 73 3b 0d 0d 74 79 70 65 | 64 65 66 20 70 61 73 63 |s;..type|def pasc|
|00001a80| 61 6c 20 4f 53 45 72 72 | 20 28 2a 4f 53 45 72 72 |al OSErr| (*OSErr|
|00001a90| 49 6e 69 74 69 61 6c 69 | 7a 65 72 29 28 29 3b 0d |Initiali|zer)();.|
|00001aa0| 74 79 70 65 64 65 66 20 | 70 61 73 63 61 6c 20 76 |typedef |pascal v|
|00001ab0| 6f 69 64 20 20 28 2a 76 | 6f 69 64 49 6e 69 74 69 |oid (*v|oidIniti|
|00001ac0| 61 6c 69 7a 65 72 29 28 | 29 3b 0d 0d 63 6c 61 73 |alizer)(|);..clas|
|00001ad0| 73 20 46 65 61 74 75 72 | 65 20 7b 0d 09 42 6f 6f |s Featur|e {..Boo|
|00001ae0| 6c 65 61 6e 09 67 6f 6f | 64 3b 0d 70 75 62 6c 69 |lean.goo|d;.publi|
|00001af0| 63 3a 0d 09 46 65 61 74 | 75 72 65 28 73 68 6f 72 |c:..Feat|ure(shor|
|00001b00| 74 20 74 72 61 70 4e 75 | 6d 2c 20 54 72 61 70 54 |t trapNu|m, TrapT|
|00001b10| 79 70 65 20 74 54 79 70 | 29 3b 0d 09 46 65 61 74 |ype tTyp|);..Feat|
|00001b20| 75 72 65 28 4f 53 54 79 | 70 65 20 74 79 70 65 2c |ure(OSTy|pe type,|
|00001b30| 20 6c 6f 6e 67 20 76 61 | 6c 75 65 29 3b 0d 09 46 | long va|lue);..F|
|00001b40| 65 61 74 75 72 65 28 4f | 53 54 79 70 65 20 74 79 |eature(O|SType ty|
|00001b50| 70 65 2c 20 6c 6f 6e 67 | 20 6d 61 73 6b 2c 20 6c |pe, long| mask, l|
|00001b60| 6f 6e 67 20 76 61 6c 75 | 65 29 3b 0d 09 46 65 61 |ong valu|e);..Fea|
|00001b70| 74 75 72 65 28 63 6f 6e | 73 74 20 46 65 61 74 75 |ture(con|st Featu|
|00001b80| 72 65 20 26 20 70 72 65 | 63 6f 6e 64 69 74 69 6f |re & pre|conditio|
|00001b90| 6e 2c 20 4f 53 45 72 72 | 49 6e 69 74 69 61 6c 69 |n, OSErr|Initiali|
|00001ba0| 7a 65 72 20 69 6e 69 74 | 29 3b 0d 09 46 65 61 74 |zer init|);..Feat|
|00001bb0| 75 72 65 28 4f 53 45 72 | 72 49 6e 69 74 69 61 6c |ure(OSEr|rInitial|
|00001bc0| 69 7a 65 72 20 69 6e 69 | 74 29 3b 0d 09 46 65 61 |izer ini|t);..Fea|
|00001bd0| 74 75 72 65 28 63 6f 6e | 73 74 20 46 65 61 74 75 |ture(con|st Featu|
|00001be0| 72 65 20 26 20 70 72 65 | 63 6f 6e 64 69 74 69 6f |re & pre|conditio|
|00001bf0| 6e 2c 20 76 6f 69 64 49 | 6e 69 74 69 61 6c 69 7a |n, voidI|nitializ|
|00001c00| 65 72 20 69 6e 69 74 29 | 3b 0d 09 46 65 61 74 75 |er init)|;..Featu|
|00001c10| 72 65 28 76 6f 69 64 49 | 6e 69 74 69 61 6c 69 7a |re(voidI|nitializ|
|00001c20| 65 72 20 69 6e 69 74 29 | 3b 0d 09 46 65 61 74 75 |er init)|;..Featu|
|00001c30| 72 65 28 63 6f 6e 73 74 | 20 46 65 61 74 75 72 65 |re(const| Feature|
|00001c40| 20 26 20 63 6f 6e 64 31 | 2c 20 63 6f 6e 73 74 20 | & cond1|, const |
|00001c50| 46 65 61 74 75 72 65 20 | 26 20 63 6f 6e 64 32 29 |Feature |& cond2)|
|00001c60| 3b 0d 0d 09 6f 70 65 72 | 61 74 6f 72 20 76 6f 69 |;...oper|ator voi|
|00001c70| 64 2a 28 29 20 63 6f 6e | 73 74 20 7b 09 72 65 74 |d*() con|st {.ret|
|00001c80| 75 72 6e 20 28 76 6f 69 | 64 20 2a 29 20 67 6f 6f |urn (voi|d *) goo|
|00001c90| 64 3b 09 7d 0d 7d 3b 0d | 0d 65 78 74 65 72 6e 20 |d;.}.};.|.extern |
|00001ca0| 46 65 61 74 75 72 65 20 | 68 61 73 4d 61 6b 65 46 |Feature |hasMakeF|
|00001cb0| 53 53 70 65 63 3b 0d 65 | 78 74 65 72 6e 20 46 65 |SSpec;.e|xtern Fe|
|00001cc0| 61 74 75 72 65 20 68 61 | 73 41 6c 69 61 73 3b 0d |ature ha|sAlias;.|
|00001cd0| 65 78 74 65 72 6e 20 46 | 65 61 74 75 72 65 09 68 |extern F|eature.h|
|00001ce0| 61 73 57 4e 45 3b 0d 65 | 78 74 65 72 6e 20 46 65 |asWNE;.e|xtern Fe|
|00001cf0| 61 74 75 72 65 20 68 61 | 73 4e 65 77 53 46 3b 0d |ature ha|sNewSF;.|
|00001d00| 65 78 74 65 72 6e 20 46 | 65 61 74 75 72 65 20 68 |extern F|eature h|
|00001d10| 61 73 50 72 6f 63 65 73 | 73 4d 67 72 3b 0d 65 78 |asProces|sMgr;.ex|
|00001d20| 74 65 72 6e 20 46 65 61 | 74 75 72 65 20 68 61 73 |tern Fea|ture has|
|00001d30| 43 52 4d 3b 0d 65 78 74 | 65 72 6e 20 46 65 61 74 |CRM;.ext|ern Feat|
|00001d40| 75 72 65 20 68 61 73 43 | 54 42 3b 0d 65 78 74 65 |ure hasC|TB;.exte|
|00001d50| 72 6e 20 46 65 61 74 75 | 72 65 20 68 61 73 53 74 |rn Featu|re hasSt|
|00001d60| 64 4e 42 50 3b 0d 65 78 | 74 65 72 6e 20 46 65 61 |dNBP;.ex|tern Fea|
|00001d70| 74 75 72 65 20 68 61 73 | 43 4d 3b 0d 65 78 74 65 |ture has|CM;.exte|
|00001d80| 72 6e 20 46 65 61 74 75 | 72 65 20 68 61 73 46 54 |rn Featu|re hasFT|
|00001d90| 3b 0d 65 78 74 65 72 6e | 20 46 65 61 74 75 72 65 |;.extern| Feature|
|00001da0| 20 68 61 73 54 4d 3b 0d | 65 78 74 65 72 6e 20 46 | hasTM;.|extern F|
|00001db0| 65 61 74 75 72 65 09 68 | 61 73 50 50 43 3b 0d 0d |eature.h|asPPC;..|
|00001dc0| 63 6c 61 73 73 20 53 63 | 61 74 74 47 61 74 68 09 |class Sc|attGath.|
|00001dd0| 7b 0d 09 48 61 6e 64 6c | 65 09 09 09 73 63 72 61 |{..Handl|e...scra|
|00001de0| 74 63 68 3b 0d 70 72 6f | 74 65 63 74 65 64 3a 0d |tch;.pro|tected:.|
|00001df0| 09 76 6f 69 64 20 2a 09 | 09 09 62 75 66 3b 0d 09 |.void *.|..buf;..|
|00001e00| 69 6e 74 09 09 09 09 6c | 65 6e 3b 0d 09 69 6e 74 |int....l|en;..int|
|00001e10| 09 09 09 09 63 6f 75 6e | 74 3b 0d 09 73 74 72 75 |....coun|t;..stru|
|00001e20| 63 74 20 69 6f 76 65 63 | 20 2a 09 69 6f 3b 0d 0d |ct iovec| *.io;..|
|00001e30| 09 53 63 61 74 74 47 61 | 74 68 28 73 74 72 75 63 |.ScattGa|th(struc|
|00001e40| 74 20 69 6f 76 65 63 20 | 2a 69 6f 76 2c 20 69 6e |t iovec |*iov, in|
|00001e50| 74 20 63 6e 74 29 3b 0d | 09 76 69 72 74 75 61 6c |t cnt);.|.virtual|
|00001e60| 20 7e 53 63 61 74 74 47 | 61 74 68 28 29 3b 0d 70 | ~ScattG|ath();.p|
|00001e70| 75 62 6c 69 63 3a 0d 09 | 76 6f 69 64 20 2a 09 09 |ublic:..|void *..|
|00001e80| 09 62 75 66 66 65 72 28 | 29 09 09 09 7b 09 72 65 |.buffer(|)...{.re|
|00001e90| 74 75 72 6e 20 62 75 66 | 3b 09 09 09 7d 0d 09 69 |turn buf|;...}..i|
|00001ea0| 6e 74 09 09 09 09 62 75 | 66 6c 65 6e 28 29 09 09 |nt....bu|flen()..|
|00001eb0| 09 7b 09 72 65 74 75 72 | 6e 20 6c 65 6e 3b 09 09 |.{.retur|n len;..|
|00001ec0| 09 7d 0d 09 69 6e 74 09 | 09 09 09 6c 65 6e 67 74 |.}..int.|...lengt|
|00001ed0| 68 28 69 6e 74 20 6c 29 | 09 7b 09 72 65 74 75 72 |h(int l)|.{.retur|
|00001ee0| 6e 20 6c 65 6e 20 3d 20 | 6c 3b 09 7d 0d 09 6f 70 |n len = |l;.}..op|
|00001ef0| 65 72 61 74 6f 72 20 76 | 6f 69 64 20 2a 28 29 09 |erator v|oid *().|
|00001f00| 09 09 09 09 7b 09 72 65 | 74 75 72 6e 20 62 75 66 |....{.re|turn buf|
|00001f10| 3b 09 09 09 7d 0d 7d 3b | 0d 0d 63 6c 61 73 73 20 |;...}.};|..class |
|00001f20| 53 63 61 74 74 65 72 65 | 72 20 3a 20 70 75 62 6c |Scattere|r : publ|
|00001f30| 69 63 20 53 63 61 74 74 | 47 61 74 68 20 7b 0d 70 |ic Scatt|Gath {.p|
|00001f40| 75 62 6c 69 63 3a 0d 09 | 53 63 61 74 74 65 72 65 |ublic:..|Scattere|
|00001f50| 72 28 73 74 72 75 63 74 | 20 69 6f 76 65 63 20 2a |r(struct| iovec *|
|00001f60| 69 6f 76 2c 20 69 6e 74 | 20 63 6f 75 6e 74 29 3b |iov, int| count);|
|00001f70| 0d 09 76 69 72 74 75 61 | 6c 20 7e 53 63 61 74 74 |..virtua|l ~Scatt|
|00001f80| 65 72 65 72 28 29 3b 0d | 7d 3b 0d 0d 63 6c 61 73 |erer();.|};..clas|
|00001f90| 73 20 47 61 74 68 65 72 | 65 72 20 3a 20 70 75 62 |s Gather|er : pub|
|00001fa0| 6c 69 63 20 53 63 61 74 | 74 47 61 74 68 20 7b 0d |lic Scat|tGath {.|
|00001fb0| 70 75 62 6c 69 63 3a 0d | 09 47 61 74 68 65 72 65 |public:.|.Gathere|
|00001fc0| 72 28 73 74 72 75 63 74 | 20 69 6f 76 65 63 20 2a |r(struct| iovec *|
|00001fd0| 69 6f 76 2c 20 69 6e 74 | 20 63 6f 75 6e 74 29 3b |iov, int| count);|
|00001fe0| 0d 09 76 69 72 74 75 61 | 6c 20 7e 47 61 74 68 65 |..virtua|l ~Gathe|
|00001ff0| 72 65 72 28 29 3b 0d 7d | 3b 0d 0d 74 79 70 65 64 |rer();.}|;..typed|
|00002000| 65 66 20 70 61 73 63 61 | 6c 20 76 6f 69 64 20 28 |ef pasca|l void (|
|00002010| 2a 44 65 66 65 72 72 65 | 64 29 28 76 6f 69 64 20 |*Deferre|d)(void |
|00002020| 2a 29 3b 0d 0d 63 6c 61 | 73 73 20 52 69 6e 67 42 |*);..cla|ss RingB|
|00002030| 75 66 66 65 72 20 7b 0d | 09 2f 2f 20 56 61 6c 69 |uffer {.|.// Vali|
|00002040| 64 20 62 79 74 65 73 20 | 61 72 65 20 62 65 74 77 |d bytes |are betw|
|00002050| 65 65 6e 20 63 6f 6e 73 | 75 6d 65 20 61 6e 64 20 |een cons|ume and |
|00002060| 76 61 6c 69 64 61 74 65 | 0d 09 2f 2f 20 46 72 65 |validate|..// Fre|
|00002070| 65 20 62 79 74 65 73 20 | 61 72 65 20 62 65 74 77 |e bytes |are betw|
|00002080| 65 65 6e 20 61 6c 6c 6f | 63 61 74 65 20 61 6e 64 |een allo|cate and|
|00002090| 20 63 6f 6e 73 75 6d 65 | 0d 09 50 74 72 09 09 62 | consume|..Ptr..b|
|000020a0| 75 66 66 65 72 3b 0d 09 | 50 74 72 09 09 65 6e 64 |uffer;..|Ptr..end|
|000020b0| 62 75 66 3b 0d 09 50 74 | 72 20 09 09 63 6f 6e 73 |buf;..Pt|r ..cons|
|000020c0| 75 6d 65 3b 0d 09 50 74 | 72 09 09 70 72 6f 64 75 |ume;..Pt|r..produ|
|000020d0| 63 65 3b 0d 09 6c 6f 6e | 67 09 09 66 72 65 65 3b |ce;..lon|g..free;|
|000020e0| 0d 09 6c 6f 6e 67 09 09 | 76 61 6c 69 64 3b 0d 09 |..long..|valid;..|
|000020f0| 42 6f 6f 6c 65 61 6e 09 | 6c 6f 63 6b 3b 0d 09 44 |Boolean.|lock;..D|
|00002100| 65 66 65 72 72 65 64 09 | 70 72 6f 63 3b 0d 09 76 |eferred.|proc;..v|
|00002110| 6f 69 64 20 2a 09 61 72 | 67 3b 0d 09 0d 09 76 6f |oid *.ar|g;....vo|
|00002120| 69 64 20 09 09 44 65 66 | 65 72 28 29 09 09 7b 09 |id ..Def|er()..{.|
|00002130| 6c 6f 63 6b 20 3d 20 74 | 72 75 65 3b 09 09 09 09 |lock = t|rue;....|
|00002140| 09 09 09 09 7d 0d 09 76 | 6f 69 64 20 09 09 55 6e |....}..v|oid ..Un|
|00002150| 64 65 66 65 72 28 29 09 | 7b 09 6c 6f 63 6b 20 3d |defer().|{.lock =|
|00002160| 20 66 61 6c 73 65 3b 20 | 69 66 20 28 70 72 6f 63 | false; |if (proc|
|00002170| 29 20 70 72 6f 63 28 61 | 72 67 29 3b 20 09 7d 0d |) proc(a|rg); .}.|
|00002180| 70 75 62 6c 69 63 3a 0d | 09 09 09 09 52 69 6e 67 |public:.|....Ring|
|00002190| 42 75 66 66 65 72 28 6c | 6f 6e 67 20 62 75 66 73 |Buffer(l|ong bufs|
|000021a0| 69 7a 29 3b 0d 09 09 09 | 09 7e 52 69 6e 67 42 75 |iz);....|.~RingBu|
|000021b0| 66 66 65 72 28 29 3b 0d | 09 0d 09 50 74 72 09 09 |ffer();.|...Ptr..|
|000021c0| 50 72 6f 64 75 63 65 72 | 28 6c 6f 6e 67 20 26 20 |Producer|(long & |
|000021d0| 6c 65 6e 29 3b 09 09 09 | 2f 2f 09 46 69 6e 64 20 |len);...|//.Find |
|000021e0| 63 6f 6e 74 69 6e 75 6f | 75 73 20 6d 65 6d 6f 72 |continuo|us memor|
|000021f0| 79 20 66 6f 72 20 70 72 | 6f 64 75 63 65 72 0d 09 |y for pr|oducer..|
|00002200| 50 74 72 09 09 43 6f 6e | 73 75 6d 65 72 28 6c 6f |Ptr..Con|sumer(lo|
|00002210| 6e 67 20 26 20 6c 65 6e | 29 3b 09 09 09 2f 2f 09 |ng & len|);...//.|
|00002220| 46 69 6e 64 20 63 6f 6e | 74 69 6e 75 6f 75 73 20 |Find con|tinuous |
|00002230| 6d 65 6d 6f 72 79 20 66 | 6f 72 20 63 6f 6e 73 75 |memory f|or consu|
|00002240| 6d 65 72 0d 09 76 6f 69 | 64 09 09 56 61 6c 69 64 |mer..voi|d..Valid|
|00002250| 61 74 65 28 6c 6f 6e 67 | 20 6c 65 6e 29 3b 09 09 |ate(long| len);..|
|00002260| 09 09 2f 2f 20 56 61 6c | 69 64 61 74 65 20 74 68 |..// Val|idate th|
|00002270| 69 73 2c 20 75 6e 61 6c | 6c 6f 63 61 74 65 20 72 |is, unal|locate r|
|00002280| 65 73 74 0d 09 76 6f 69 | 64 20 09 09 49 6e 76 61 |est..voi|d ..Inva|
|00002290| 6c 69 64 61 74 65 28 6c | 6f 6e 67 20 6c 65 6e 29 |lidate(l|ong len)|
|000022a0| 3b 0d 09 76 6f 69 64 09 | 09 50 72 6f 64 75 63 65 |;..void.|.Produce|
|000022b0| 28 50 74 72 20 66 72 6f | 6d 2c 20 6c 6f 6e 67 20 |(Ptr fro|m, long |
|000022c0| 26 20 6c 65 6e 29 3b 2f | 2f 09 41 6c 6c 6f 63 61 |& len);/|/.Alloca|
|000022d0| 74 65 2c 20 63 6f 70 79 | 20 26 20 76 61 6c 69 64 |te, copy| & valid|
|000022e0| 61 74 65 0d 09 76 6f 69 | 64 09 09 43 6f 6e 73 75 |ate..voi|d..Consu|
|000022f0| 6d 65 28 50 74 72 20 74 | 6f 2c 20 6c 6f 6e 67 20 |me(Ptr t|o, long |
|00002300| 26 20 6c 65 6e 29 3b 09 | 2f 2f 20 43 6f 70 79 20 |& len);.|// Copy |
|00002310| 26 20 69 6e 76 61 6c 69 | 64 61 74 65 0d 09 0d 09 |& invali|date....|
|00002320| 6c 6f 6e 67 09 09 46 72 | 65 65 28 29 09 09 09 09 |long..Fr|ee()....|
|00002330| 09 09 09 09 7b 09 72 65 | 74 75 72 6e 20 66 72 65 |....{.re|turn fre|
|00002340| 65 3b 09 09 09 7d 09 09 | 0d 09 6c 6f 6e 67 09 09 |e;...}..|..long..|
|00002350| 56 61 6c 69 64 28 29 09 | 09 09 09 09 09 09 09 7b |Valid().|.......{|
|00002360| 09 72 65 74 75 72 6e 20 | 76 61 6c 69 64 3b 09 09 |.return |valid;..|
|00002370| 09 7d 0d 09 0d 09 42 6f | 6f 6c 65 61 6e 09 4c 6f |.}....Bo|olean.Lo|
|00002380| 63 6b 65 64 28 29 09 09 | 09 09 09 09 09 09 7b 09 |cked()..|......{.|
|00002390| 72 65 74 75 72 6e 20 6c | 6f 63 6b 3b 09 09 09 7d |return l|ock;...}|
|000023a0| 0d 09 76 6f 69 64 09 09 | 4c 61 74 65 72 28 44 65 |..void..|Later(De|
|000023b0| 66 65 72 72 65 64 20 64 | 65 66 2c 20 76 6f 69 64 |ferred d|ef, void|
|000023c0| 20 2a 20 61 72 29 7b 09 | 70 72 6f 63 20 3d 20 64 | * ar){.|proc = d|
|000023d0| 65 66 3b 20 61 72 67 20 | 3d 20 61 72 3b 7d 0d 09 |ef; arg |= ar;}..|
|000023e0| 0d 09 6f 70 65 72 61 74 | 6f 72 20 76 6f 69 64 20 |..operat|or void |
|000023f0| 2a 28 29 09 09 09 09 09 | 09 09 09 7b 09 72 65 74 |*().....|...{.ret|
|00002400| 75 72 6e 20 62 75 66 66 | 65 72 3b 09 09 09 7d 0d |urn buff|er;...}.|
|00002410| 7d 3b 0d 0d 42 6f 6f 6c | 65 61 6e 20 43 6f 70 79 |};..Bool|ean Copy|
|00002420| 49 63 6f 6e 46 61 6d 69 | 6c 79 28 73 68 6f 72 74 |IconFami|ly(short|
|00002430| 20 73 72 63 52 65 73 46 | 69 6c 65 2c 20 73 68 6f | srcResF|ile, sho|
|00002440| 72 74 20 73 72 63 49 44 | 2c 20 73 68 6f 72 74 20 |rt srcID|, short |
|00002450| 64 73 74 52 65 73 46 69 | 6c 65 2c 20 73 68 6f 72 |dstResFi|le, shor|
|00002460| 74 20 64 73 74 49 44 29 | 3b 0d 0d 70 61 73 63 61 |t dstID)|;..pasca|
|00002470| 6c 20 4f 53 45 72 72 20 | 50 50 43 49 6e 69 74 5f |l OSErr |PPCInit_|
|00002480| 50 28 29 3b 0d 0d 4f 53 | 45 72 72 20 41 70 70 6c |P();..OS|Err Appl|
|00002490| 65 54 61 6c 6b 49 64 65 | 6e 74 69 74 79 28 73 68 |eTalkIde|ntity(sh|
|000024a0| 6f 72 74 20 26 20 6e 65 | 74 2c 20 73 68 6f 72 74 |ort & ne|t, short|
|000024b0| 20 26 20 6e 6f 64 65 29 | 3b 0d 0d 00 00 00 00 00 | & node)|;.......|
|000024c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002500| 00 00 01 00 00 00 01 dc | 00 00 00 dc 00 00 00 68 |........|.......h|
|00002510| 73 20 61 20 6e 69 63 65 | 20 6c 69 74 74 6c 65 20 |s a nice| little |
|00002520| 65 78 74 72 61 20 74 68 | 61 74 20 6d 61 6b 65 73 |extra th|at makes|
|00002530| 08 47 55 53 49 5f 50 2e | 68 00 02 00 00 00 54 45 |.GUSI_P.|h.....TE|
|00002540| 58 54 4d 50 53 20 00 00 | 04 78 01 40 00 00 00 00 |XTMPS ..|.x.@....|
|00002550| 00 00 54 45 58 54 4d 50 | 53 20 00 00 04 78 01 40 |..TEXTMP|S ...x.@|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 a5 f5 5c d8 00 00 | 24 3b 00 00 02 44 6c 69 |....\...|$;...Dli|
|00002580| 6e 67 20 61 6e 79 20 6f | 66 20 74 68 65 69 72 0d |ng any o|f their.|
|00002590| 20 20 20 20 20 20 20 20 | 63 61 6c 6c 20 62 61 63 | |call bac|
|000025a0| 6b 20 70 72 6f 63 65 64 | 75 72 65 73 2c 20 70 75 |k proced|ures, pu|
|000025b0| 73 68 65 73 20 74 68 65 | 20 65 78 74 72 61 20 70 |shes the| extra p|
|000025c0| 61 72 61 6d 65 74 65 72 | 20 6f 66 20 79 6f 75 72 |arameter| of your|
|000025d0| 44 61 74 61 50 74 72 20 | 6f 6e 0d 20 20 20 20 20 |DataPtr |on. |
|000025e0| 20 20 20 74 68 65 20 73 | 74 61 63 6b 2e 0d 20 20 | the s|tack.. |
|000025f0| 20 20 0d 20 20 20 20 20 | 20 20 20 49 6e 20 61 64 | . | In ad|
|00002600| 00 00 00 50 92 94 26 01 | 3f e5 32 30 00 04 00 0a |...P..&.|?.20....|
|00002610| 00 00 00 00 00 00 a7 7f | 07 9c a7 7f 07 9c a6 71 |........|.......q|
|00002620| 49 ef 00 00 bf be 00 01 | 00 14 00 09 05 47 55 53 |I.......|.....GUS|
|00002630| 49 ba 00 05 6e 65 65 72 | 69 00 01 39 00 08 47 55 |I...neer|i..9..GU|
|00002640| 53 49 5f 50 2e 68 00 00 | 00 00 08 53 41 46 45 53 |SI_P.h..|...SAFES|
|00002650| 50 49 4e 00 00 00 00 48 | 00 09 4d 6f 6e 61 63 6f |PIN....H|..Monaco|
|00002660| 00 00 9a 84 00 09 4d 6f | 6e 61 63 6f 00 2a 2a 2a |......Mo|naco.***|
|00002670| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 00 06 00 03 01 10 |********|**......|
|00002680| fd b0 02 89 ff d1 00 52 | 00 23 01 cb 02 44 a7 7f |.......R|.#...D..|
|00002690| 18 ed 00 00 12 e7 00 00 | 12 e7 00 00 05 02 01 00 |........|........|
|000026a0| 00 00 00 16 00 01 00 00 | 02 e5 00 00 03 11 0b 4c |........|.......L|
|000026b0| 61 73 74 43 68 61 6e 67 | 65 00 00 00 00 1e 01 10 |astChang|e.......|
|000026c0| fd b0 02 89 ff d1 00 52 | 00 23 01 cb 02 44 00 00 |.......R|.#...D..|
|000026d0| 05 02 00 00 00 00 00 00 | 00 00 00 00 00 00 01 00 |........|........|
|000026e0| 00 00 01 dc 00 00 00 dc | 00 00 00 68 01 76 9d 44 |........|...h.v.D|
|000026f0| 0b c2 00 00 00 1c 00 5e | 00 01 4d 50 53 52 00 02 |.......^|..MPSR..|
|00002700| 00 12 63 6b 69 64 00 00 | 00 36 03 ed ff ff 00 00 |..ckid..|.6......|
|00002710| 00 54 00 00 00 00 03 ef | ff ff 00 00 00 a0 00 00 |.T......|........|
|00002720| 00 00 03 f0 ff ff 00 00 | 00 ba 01 7c 46 58 00 80 |........|...|FX..|
|00002730| 00 00 00 00 00 00 00 00 | 00 00 09 50 72 6f 6a 65 |........|...Proje|
|00002740| 63 74 6f 72 00 00 00 00 | 00 00 00 00 00 00 00 00 |ctor....|........|
|00002750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+